<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Standard
 *
 * @mixin \Eloquent
 * @property int $id
 * @property string|null $name
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Standard whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Standard whereName($value)
 */
class Standard extends Model
{
    //
    protected $table = 'standard';

    public static function getSelectOptions()
    {
        $options = \DB::table('standard')->select('id','name as text')->get();
        $selectOption = [0=>'无'];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }
}
